import { localeIdx, localeIdx2 } from '@/enum/index.js'
export default {
	namespaced: true,
	state: {
		isNetwork: true,
		locale: uni.getStorageSync('locale') || 'en',
		localeIdx: 2, //英文  默认2
		fingerprint: 'error',
		isFinger: false,
		sysInfo: {},
		// 
	},
	mutations: {
		SET_SYSINFO(state, sysInfo) {
			state.sysInfo = sysInfo;
		},
		SET_NETWORK(state, status) {
			state.isNetwork = status;
		},
		SET_LOCALEIDX(state, locale) {
			//否则为选中语言
			state.localeIdx = localeIdx[locale];
		},
		SET_LOCALE(state, locale) {
			state.locale = locale; //否则为选中语言
			state.localeIdx = localeIdx[locale];
		},
		SET_FINGERPRINT(state, type) {
			state.fingerprint = type;
		},
		SET_ISFINGER(state, type) {
			state.isFinger = type;
		},
	},
	actions: {

	}
}
